package com.li.arithmetic;

import java.util.Scanner;

public class MatchCharacter {
	public static void main(String[] args) {
		countTheCharacter();
	}
	
	public static void countTheCharacter(){
		Scanner scan=new Scanner(System.in);
		String input=scan.nextLine();
		
		String model1="[a-zA-Z]";
		String model2="[0-9]";
		
		int count1=0;
		int count2=0;
		
		char[] data=input.toCharArray();
		
		for(char temp:data){
			String s=String.valueOf(temp);
			if(s.matches(model1)){
				count1++;
			}else if(s.matches(model2)){
				count2++;
			}else{
				
			}
		}
		
		System.out.println("字母数:"+count1);
		System.out.println("数字数:"+count2);
	}
}
